import request from "@/utils/request"

export function userLogin(params) {
	return request.post("user/login", params).then(res => {
		return res.data
	})
}

export function userInfo() {
	return request.get("user/info").then(res => {
		return res.data
	})
}

export function userScore() {
	return request.get("user/score").then(res => {
		return res.data
	})
}


export function updateUserInfo(params) {
	return request.put("user/update", params).then(res => {
		return res.data
	})
}

export function userProfession(params) {
	return request.get("user/profession/list", params).then(res => {
		return res.data
	})
}

export function userScoreHistoryList(params) {
	return request.get("user/score/history", {
		params: params
	}).then(res => {
		return res.data
	})
}

export function userScoreAdd(params) {
	return request.post("user/score/add", params).then(res => {
		return res.data
	})
}